<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <head th:include="common :: header"></head>
    <!--Font Awesome [ OPTIONAL ]-->
    <link th:href="@{/assets/css/magic-check.min.css}" rel="stylesheet">
</head>

<body>
<div id="page-content">

    <div class="row">
        <div class="col-lg-12">
            <div class="panel">
                <form id="dataForm" class="form-horizontal" th:action="@{${action}}" method="post">
                     <div class="panel-body">
                         <p class="text-main text-bold">基本资料</p>
                         <hr>
                         <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">用户名</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="username" placeholder="用户名" data-bv-notempty="true"
                                       data-bv-notempty-message="用户名不能为空"/>
                            </div>
                         </div>
                         <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">昵称</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="nickname" placeholder="昵称" data-bv-notempty="true"
                                       data-bv-notempty-message="昵称不能为空"/>
                            </div>
                         </div>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">性别</label>
                             <div class="col-lg-7 col-sm-9">
                                 <div class="radio">
                                     <label>
                                         <input type="radio" name="gender" value="1"
                                                data-bv-notempty="true"
                                                data-bv-notempty-message="性别不能为空" /> 男
                                     </label>
                                     <label>
                                         <input type="radio" name="gender" value="0" /> 女
                                     </label>
                                 </div>
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">备注</label>
                             <div class="col-lg-7 col-sm-9">
                                 <textarea type="text" class="form-control" name="remark" placeholder="备注"></textarea>
                             </div>
                         </div>
                         <p class="text-main text-bold">联系方式</p>
                         <hr>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">邮箱地址</label>
                             <div class="col-lg-7 col-sm-9">
                                 <input type="text" class="form-control" name="email" placeholder="邮箱地址"
                                        data-bv-notempty="true"
                                        data-bv-notempty-message="邮箱不能为空"

                                        data-bv-emailaddress="true"
                                        data-bv-emailaddress-message="邮箱格式不正确" />
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">手机号码</label>
                             <div class="col-lg-7 col-sm-9">
                                 <input type="text" class="form-control" name="mobile" placeholder="手机号码"
                                        data-bv-digits="true"
                                        data-bv-digits-message="手机号码格式不正确" />
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">QQ 号码</label>
                             <div class="col-lg-7 col-sm-9">
                                 <input type="text" class="form-control" name="qq" placeholder="QQ 号码"
                                        data-bv-digits="true"
                                        data-bv-digits-message="手机号码格式不正确" />
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-lg-3 col-sm-2 control-label">家庭地址</label>
                             <div class="col-lg-7 col-sm-9">
                                 <input type="text" class="form-control" name="address" placeholder="家庭地址" />
                             </div>
                         </div>
                    </div>
                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-12">
                                <button class="btn btn-primary" type="submit">提交</button>
                                <button class="btn btn-default" type="reset">重置</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>



</div>
<!-- END SETTINGS -->
<div th:include="common :: script"></div>
<!--Form validation [ SAMPLE ]-->
<!--<script th:src="@{/assets/js/form-validation.js}"></script>-->
<script>
    $(function() {
        // 表单通过内嵌属性校验数据，具体 http://bootstrapvalidator.votintsev.ru/getting-started/
        $.freedom.action.save(document.getElementsByTagName("form")[0].getAttribute("id"));
    });
</script>
</body>
</html>
